home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * (a) (C) 1990 by Adobe Systems Incorporated. All rights reserved.
- *
- * (b) If this Sample Code is distributed as part of the Display PostScript
- * System Software Development Kit from Adobe Systems Incorporated,
- * then this copy is designated as Development Software and its use is
- * subject to the terms of the License Agreement attached to such Kit.
- *
- * (c) If this Sample Code is distributed independently, then the following
- * terms apply:
- *
- * (d) This file may be freely copied and redistributed as long as:
- * 1) Parts (a), (d), (e) and (f) continue to be included in the file,
- * 2) If the file has been modified in any way, a notice of such
- * modification is conspicuously indicated.
- *
- * (e) PostScript, Display PostScript, and Adobe are registered trademarks of
- * Adobe Systems Incorporated.
- *
- * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
- * CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
- * AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
- * ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
- * OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
- * WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
- * WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
- * DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
- * OF THIRD PARTY RIGHTS.
- */
-
- /*
- * ScrollingView.m
- *
- * The sole purpose of subclassing ScrollView is to sync up the
- * scrolling of the alpha buffer with the scrolling of the window.
- *
- * The lockFocus and the unlockFocus are a little voodoo magic
- * that causes the compositing in the raw scroll of the buffer to work.
- * (The window that contains the buffer is displayed when it is first
- * created in order to set the canDraw instance variable in buffer
- * view to YES. Again, more voodoo.)
- *
- * Version: 2.0
- * Author: Ken Fromm
- * History:
- * 03-07-91 Added this comment.
- */
-
- #import "ScrollingView.h"
- #import "DetectApp.h"
- #import "DrawingView.h"
- #import <appkit/ClipView.h>
-
- @implementation ScrollingView
-
- - scrollClip:aClipView to:(const NXPoint *)aPoint
- {
- id bufferAlpha;
-
- bufferAlpha = [NXApp getBufferAlpha];
- [[bufferAlpha superview] setCopyOnScroll:[[NXApp getDrawingView] isScrolling]];
- [[bufferAlpha superview] rawScroll:aPoint];
- [bufferAlpha lockFocus];
- [bufferAlpha unlockFocus];
-
- [aClipView rawScroll:aPoint];
-
- return self;
- }
-
- @end
-